import request from '@/utils/request'

export function get(data) {
  return request({
    url: 'api/salesPointsRule',
    method: 'get',
    params: data
  })
}

export function add(data) {
  return request({
    url: 'api/salesPointsRule/addOrSave',
    method: 'post',
    data
  })
}
export function detail(data) {
  return request({
    url: 'api/salesPointsRule/detail',
    method: 'get',
    params: data
  })
}
export function del(ids) {
  return request({
    url: 'api/salesPointsRule',
    method: 'delete',
    data: ids
  })
}
export function enableOrDisable(data) {
  const obj = {
    url: 'api/salesPointsRule/enableOrDisable',
    method: 'post',
    data
  }
  return request(obj)
}
export default { get,add,detail,del,enableOrDisable}
